package cn.wolfcode.luowowo.search.template;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Document(indexName="luowowo_shop_strategy",type="shopStrategy")
@Getter
@Setter
public class ShopStrategyTemplate implements Serializable {
    public static final String INDEX_NAME = "luowowo_shop_strategy";
    public static final String TYPE_NAME = "shopStrategy";
    @Id
    //@Field 每个文档的字段配置（类型、是否分词、是否存储、分词器 ）
    @Field(store=true, index = true,type = FieldType.Long)
    private Long id;  //物品攻略id
    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String name;  //物品攻略名字

    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String english;    //物品攻略英文
    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String pinyin;    //物品攻略拼音


    @Field(store=true, index = true,type = FieldType.Long)
    private Long parentId;   //国家id(通过目的id关联而来)
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String parentName;
    @Field(store=true, index = true,type = FieldType.Boolean)
    private Boolean ishot;     //主题是否热门

    @Field(index=true,analyzer="ik_max_word",store=true,searchAnalyzer="ik_max_word",type = FieldType.Text)
    private String info;  //物品攻略简介
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String coverUrl;     //封面
    @Field(store=true, index = true,type = FieldType.Long)
    private Integer deep;   //级别深度

    @Field(store=true, index = true,type = FieldType.Long)
    private Long themeId;     //主题id
    @Field(index=true,store=true,type = FieldType.Keyword)
    private String themeName;   //主题名



}